package simple.zombie;

// JFC
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.net.*;

// GTGE
import com.golden.gamedev.*;
import com.golden.gamedev.object.*;

import java.awt.event.KeyEvent;

public class MainCharacter {
  public def frameList          = []; //int array hold the frame list of the character
  public def currentFrameIndex  = 0;
  public def coordinate         = [ x: 0, y: 0 ];
  public int stepSize           = 1;
  
  public static final int UP    = 1;
  public static final int DOWN  = 2;
  public static final int LEFT  = 3;
  public static final int RIGHT = 4;
  public def currentDirection   = RIGHT;
  
  public MainCharacter( frameList, x, y, stepSize ) {
    this.frameList    = frameList;
    this.coordinate.x = x;
    this.coordinate.y = y;
    this.stepSize     = stepSize;
  }
  
  public void moveUp() {
    coordinate.y    -= stepSize;
    currentDirection = UP;
  }
  
  public void moveDown() {
    coordinate.y    -= stepSize;
    currentDirection = DOWN;
  }
  
  public void moveLeft() {
    coordinate.y    -= stepSize;
    currentDirection = LEFT;
  }
  
  public void moveRight() {
    coordinate.y    -= stepSize;
    currentDirection = RIGHT;
  }
}